package com.init.bootframe.util;

import java.io.File;

/**
 * 常量类
 * 
 * @author chentao 2019-03-07
 *
 */
public class TmompConstant {

	/**
	 * 基础常量信息
	 * 
	 * @author chentao 2019-03-07
	 *
	 */
	public interface BaseDataConstant {

		/**
		 * 时间格式类型
		 */
		public final static String FORMATE_DATA1 = "yyyyMMdd";
		public final static String FORMATE_DATA2 = "yyyy-MM-dd";
		public final static String FORMATE_DATA3 = "yyyy年MM月dd日";
		public final static String FORMATE_DATA_TIME1 = "yyyyMMddHHmmss";
		public final static String FORMATE_DATA_TIME2 = "yyyy-MM-dd HH:mm:ss";
		public final static String FORMATE_DATA_TIME3 = "yyyy年MM月dd日 HH:mm:ss";

		/**
		 * 状态：1表示有效，0表示失效,-1表示删除,2表示草稿
		 */
		public final static String STATUS_EFFECTIVE = "1";
		public final static String STATUS_INVALID = "0";
		public final static String STATUS_DELTED = "-1";
		public final static String STATUS_DRAFT = "2";

		/**
		 * InputStreamReader 编码
		 */
		public final static String INPUT_STREAM_READER_ENCODING = "UTF-8";

		/**
		 * 附件上传配置
		 */
		public static final int MEMORY_THRESHOLD = 3 * 1024 * 1024; // 3MB

		public static final int MAX_FILE_SIZE = 100 * 1024 * 1024;// 单个文件最大10MB
		public static final int MAX_REQUEST_SIZE = 1000 * 1024 * 1024;// 批量文件最大200MB

		public static final int MAX_IMG_FILE_SIZE = 20 * 1024 * 1024; // 单张图片最大20MB
		public static final int MAX_IMG_REQUEST_SIZE = 200 * 1024 * 1024; // 批量上传最大图片200MB

		public static final int MAX_VIDEO_FILE_SIZE = 200 * 1024 * 1024; // 单个视频最大200MB
		public static final int MAX_VIDEO_REQUEST_SIZE = 500 * 1024 * 1024; // 批量视频最大500MB

		public final static String EXCEL_PREFIX_FOR_2007 = ".xlsx";// Excel2007版本及以上文件后缀
		public final static String EXCEL_PREFIX_FOR_2003 = ".xls";// Excel2003版本文件后缀
		public final static String CSV_PREFIX = ".csv";// CSV版本文件后缀

		public final static String TEMP_FILE_CATALOG = File.separatorChar + "upload" + File.separatorChar + "temp";// 上传文件临时目录
		public final static String IMG_FILE_CATALOG = File.separatorChar + "upload" + File.separatorChar + "imgFile";// 图片上传目录
		public final static String VIDEO_FILE_CATALOG = File.separatorChar + "upload" + File.separatorChar
				+ "videoFile";// 视频上传目录
		public final static String VERSION_FILE_VOICE = File.separatorChar + "upload" + File.separatorChar
				+ "voiceFile";// 音频上传目录

		/**
		 * 附件类型
		 * 
		 * 类型：图片
		 */
		public final static String ATTACHMENT_TYPE_IMG = "1";

		/**
		 * 附件类型
		 * 
		 * 类型：视频
		 */
		public final static String ATTACHMENT_TYPE_VIDEO = "2";

		/**
		 * 返回map常量
		 */
		public final static String DEFAULT_VALUE_MSG = "msg";// 消息描述
		public final static String DEFAULT_VALUE_RESULT = "result";// 结果
		public final static String DEFAULT_VALUE_TYPE = "type";// 类型
		public final static String DEFAULT_VALUE_DATETIME = "dateTime";// 时间
		public final static String DEFAULT_VALUE_ERROR_CODE = "errorCode";// 错误编码
		public final static String DEFAULT_VALUE_ROWS = "rows";// 数据集合
		public final static String DEFAULT_VALUE_ROW = "row";// 单条数据集合

		public final static String DEFAULT_VALUE_TOTAL = "total";// 总数
		public final static String DEFAULT_VALUE_MAX = "max";// 最大值
		public final static String DEFAULT_VALUE_MIN = "min";// 最小值
		public final static String DEFAULT_VALUE_TITLE = "title";// 标题
		public final static String DEFAULT_VALUE_URL = "url";// 路径
		public final static String DEFAULT_VALUE_PATH = "errFilePath";// 错误文件路径

		/**
		 * 美灵宝组织code
		 * 
		 */
		public final static String MOST_SUPERIOR_ORG_CODE = "201903151513198876081";
		
		/**
		 * 用户数据类型，1系统人员
		 */
		public final static String DATA_TYPE_SYSTEM = "1";

		/**
		 * 用户数据类型，2运营人员
		 */
		public final static String DATA_TYPE_OPERAT = "2";
		
		/**
		 * 用户类型，1系统用户
		 */
		public final static String USER_TYPE_SYSTEM = "1";

		/**
		 * 用户类型，2游客用户
		 */
		public final static String USER_TYPE_VISITOR = "2";
		
		/**
		 * 设备是否在线，1在线
		 */
		public final static String DEVICE_ONLINE = "1";
		
		/**
		 * 设备是否在线，1在线
		 */
		public final static String DEVICE_OFFLINE = "2";

		/**
		 * 默认值
		 */
		public final static String DEFAULT_VALUE_ZERO = "0";
		public final static String DEFAULT_VALUE_ONE = "1";
		public final static String DEFAULT_VALUE_TWO = "2";
		public final static String DEFAULT_VALUE_THREE = "3";
		public final static String DEFAULT_VALUE_FOUR = "4";
		public final static String DEFAULT_VALUE_FIVE = "5";
		public final static String DEFAULT_VALUE_SIX = "6";
		public final static String DEFAULT_VALUE_SEVEN = "7";
		public final static String DEFAULT_VALUE_NINE = "9";
		public final static String DEFAULT_VALUE_TEN = "10";
		public final static String DEFAULT_VALUE_MINUS_ONE = "-1";
		public final static String DEFAULT_VALUE_TWELVE = "15";

		/**
		 * 性别，1男 2 女
		 */
		public final static String SEX_MAN = "1";
		public final static String SEX_WOMAN = "2";

		/**
		 * 是否选项
		 */
		public final static String TRAIN_TRUE = "1";
		public final static String TRAIN_FALSE = "2";

		/**
		 * 超级管理员Id
		 */
		public final static String SUPER_ADMIN_ID = "1";
		
		
		/**
		 * 设备操作记录类型:运维人员登录记录
		 */
		public final static String DEVICE_LOG_TYPE_ONE = "1";
		/**
		 * 设备操作记录类型:卡位解锁
		 */
		public final static String DEVICE_LOG_TYPE_TWO = "2";
		/**
		 * 设备操作记录类型:清洁模式
		 */
		public final static String DEVICE_LOG_TYPE_THREE = "3";
		/**
		 * 设备操作记录类型:设备复位
		 */
		public final static String DEVICE_LOG_TYPE_FOUR = "4";
		/**
		 * 设备操作记录类型:设备基本参数修改
		 */
		public final static String DEVICE_LOG_TYPE_FIVE = "5";
		/**
		 * 设备操作记录类型:货道开关
		 */
		public final static String DEVICE_LOG_TYPE_SIX = "6";
		/**
		 * 设备操作记录类型:绑定商品
		 */
		public final static String DEVICE_LOG_TYPE_SEVEN = "7";
		/**
		 * 设备操作记录类型:绑定广告
		 */
		public final static String DEVICE_LOG_TYPE_EIGHT = "8";
		/**
		 * 设备操作记录类型:删除广告
		 */
		public final static String DEVICE_LOG_TYPE_NINE = "9";
		/**
		 * 设备操作记录类型:发布广告
		 */
		public final static String DEVICE_LOG_TYPE_TEN = "10";
		/**
		 * 设备操作记录类型:激活设备
		 */
		public final static String DEVICE_LOG_TYPE_ELEVEN = "11";
		/**
		 * 设备操作记录类型:取消激活设备
		 */
		public final static String DEVICE_LOG_TYPE_TWELVE = "12";
		/**
		 * 设备操作记录类型:设备绑定平板记录
		 */
		public final static String DEVICE_LOG_TYPE_THIRTEEN = "13";
		/**
		 * 设备操作记录类型:设备绑定运营人员记录
		 */
		public final static String DEVICE_LOG_TYPE_FOURTEEN = "14";
		/**
		 * 设备操作记录类型:设备绑定加盟商记录
		 */
		public final static String DEVICE_LOG_TYPE_FIFTEEN = "15";
		/**
		 * 设备操作记录类型:正常模式
		 */
		public final static String DEVICE_LOG_TYPE_SIXTEEN = "16";

		/**
		 * 茶机mqtt topic前缀
		 */
		public final static String TMOMP_MQTT = "tmomp_mqtt_";
		
		/**
		 * mqtt通知类型 广告通知
		 */
		public final static String TMOMP_MQTT_AD_TYPE = "1";
		
		/**
		 * mqtt通知类型  支付通知
		 */
		public final static String TMOMP_MQTT_PAY_TYPE = "2";

		/**
		 * mqtt通知类型  支付通知
		 */
		public final static String TMOMP_MQTT_REFILL_TYPE = "3";
		
		/**
		 * mqtt通知类型  更新通知
		 */
		public final static String TMOMP_MQTT_UPDATE_TYPE = "4";
		
		/**
		 * mqtt通知类型 在线通知
		 */
		public final static String TMOMP_MQTT_ISONLINE_TYPE = "5";
		
		/**
		 * mqtt通知类型 复位通知
		 */
		public final static String TMOMP_MQTT_RESET_TYPE = "6";
		
		/**
		 * mqtt通知类型 登录通知
		 */
		public final static String TMOMP_MQTT_LOGIN_TYPE = "7";
		
		/**
		 * 微信授权 获取openid 类型
		 * 运维绑定 
		 */
		public final static String TMOMP_WECHAT_OAUTH_BIND = "1";
		
		/**
		 * 微信授权 获取openid 类型
		 * 微信关注优惠
		 */
		public final static String TMOMP_WECHAT_OAUTH_DISCOUNT = "2";

		/**
		 * 微信授权 获取openid 类型
		 * 微信支付
		 */
		public final static String TMOMP_WECHAT_OAUTH_PAY = "3";
		
	}

	/**
	 * Redis常量
	 * 
	 * @author chentao 2019-03-07
	 */
	public interface RedisConstant {

		/**
		 * redis临时存储key前缀-系统后台登录用户
		 */
		public final static String REDIS_KEY_PREFIX_SYSTEM_USER = "systemUser_";

		/**
		 * redis永久存储key前缀-系统基础数据缓存数据
		 */
		public final static String REDIS_KEY_PREFIX_BASEDATA_CODE = "baseDataCode_";

		/**
		 * redis永久存储key前缀-国际化缓存数据
		 */
		public final static String REDIS_KEY_PREFIX_LANGUAGE_PROP = "languageProp_";

		/**
		 * 登录token有效时长(按秒计算)
		 */
		public static Integer TOKEN_LOGIN_DEFUALT_TIME = 60 * 60 * 10;

		/**
		 * 临时token有效时长(按秒计算)
		 */
		public static Integer TOKEN_TEMP_DEFUALT_TIME = 60 * 60 * 10;

		/**
		 * 缓存Redis有效时长(按秒计算)
		 */
		public static Integer TOKEN_CACHE_DEFUALT_TIME = 0;

	}

	/**
	 * 异常信息常量编码
	 * 
	 * @author chentao 2018年10月25日
	 */
	public interface ExceptionConstant {

		/**
		 * 操作成功
		 */
		public final static String CODE_HANDLE_SUCCESS = "10000";

		/**
		 * 操作失败
		 */
		public final static String CODE_HANDLE_FAILED = "10001";

		/**
		 * 获取token成功
		 */
		public final static String CODE_TOKEN_GET_SUCCESS = "10002";

		/**
		 * 请求token授权过期
		 */
		public final static String CODE_TOKEN_PAST_DUE = "100021";

		/**
		 * 验证码失效
		 */
		public final static String CODE_PHONE_CODE_ISNULL = "100022";

		/**
		 * 系统异常
		 */
		public final static String CODE_SYSTEM_ERROR = "10003";

		/**
		 * 参数无效
		 */
		public final static String CODE_PARAMETER_INVALID = "10004";

		/**
		 * 参数为空
		 */
		public final static String CODE_PARAMETER_ISNULL = "100041";

		/**
		 * 用户信息不存在
		 */
		public final static String CODE_USER_INFO_ISNULL = "100015";

		/**
		 * Redis异常
		 */
		public final static String CODE_REDIS_ERROR = "10005";

	}

	/**
	 * 通用设置参数
	 * 
	 * @author chentao 2018年10月25日
	 */
	public interface SettingsConstant {

		/**
		 * 参数名称：appId
		 */
		public final static String PARAMER_NAME_APPID = "appId";

		/**
		 * 参数名称：secret
		 */
		public final static String PARAMER_NAME_SECRET = "secret";

		/**
		 * 参数名称：aes_key
		 */
		public final static String PARAMER_AES_KEY = "aes_key";

		/**
		 * 参数名称：aes_algorithmstr
		 */
		public final static String PARAMER_AES_ALGORITHMSTR = "aes_algorithmstr";

		/**
		 * 参数名称：url_prefix_config
		 */
		public final static String URL_PREFIX_CONFIG = "url_prefix_config";
		
		/**
		 * 项目属性配置文件
		 */
		public final static String SETTINGS_FILE_NAME = "settings.properties";
	}

	/**
	 * 微信常量信息
	 * 
	 * @author Administrator
	 *
	 */
	public interface WeChatConstant {

		/**
		 * 微信属性配置文件
		 */
		public final static String PROPERTIES_FILE_NAME = "wxConfig.properties";
		
		/**
		 * wxAppId
		 */
		public final static String PROPERTIES_APPID = "wxAppId";

		/**
		 * wxSecret
		 */
		public final static String PROPERTIES_SECRET = "wxSecret";

		/**
		 * wxMessageID
		 */
		public final static String PROPERTIES_MESSAGEID = "wxMessageID";
		
		/**
		 * wxMessageIDS
		 */
		public final static String PROPERTIES_MESSAGEIDS = "wxMessageIDS";
         
		/**
		 * wxPaymentMessageID
		 */
		public final static String PROPERTIES_PAYMENTMESSAGEID = "wxPaymentMessageID";
         
		
		/**
		 * wxTokenURI
		 */
		public final static String PROPERTIES_TOKEN_URI = "wxTokenURI";

		/**
		 * wxAccessTokenURI
		 */
		public final static String PROPERTIES_ACCESS_TOKEN_URI = "wxAccessTokenURI";

		/**
		 * wxUserInfoURI
		 */
		public final static String PROPERTIES_USER_URI = "wxUserInfoURI";

		/**
		 * wxUserInfoURI2
		 */
		public final static String PROPERTIES_USER_URI_2 = "wxUserInfoURI_2";

		/**
		 * wxTicketURI
		 */
		public final static String PROPERTIES_TICKET_URI = "wxTicketURI";

		/**
		 * wxAuthorizeURI
		 */
		public final static String PROPERTIES_AUTHORIZE_URI = "wxAuthorizeURI";

		/**
		 * wxTemplateURI
		 */
		public final static String PROPERTIES_TEMPLATE_URI = "wxTemplateURI";

		/**
		 * wxCreateMenuURI
		 */
		public final static String PROPERTIES_CREATE_MENU_URI = "wxCreateMenuURI";

		/**
		 * wxdeleteMenuURI
		 */
		public final static String PROPERTIES_DELETE_MENU_URI = "wxdeleteMenuURI";

		/**
		 * wxGetMenuURI
		 */
		public final static String PROPERTIES_GET_MENU_URI = "wxGetMenuURI";

		/**
		 * 微信订阅号 用户授权地址 wxSubscribeNumAuthorizeURI
		 */
		public final static String PROPERTIES_SUBSCRIBE_NUM_AUTHORIZE_URI = "wxSubscribeNumAuthorizeURI";
		/**
		 * 微信订阅号 消息模板地址 wxSubscribeNumTemplateURI
		 */
		public final static String PROPERTIES_SUBSCRIBE_NUM_TEMPLATE_URI = "wxSubscribeNumTemplateURI";

		/**
		 * 请求消息类型：事件
		 */
		public static final String REQ_MESSAGE_TYPE_EVENT = "event";

		/**
		 * 事件类型：subscribe(关注)
		 */
		public static final String EVENT_TYPE_SUBSCRIBE = "subscribe";

		/**
		 * 事件类型：unsubscribe(取消关注)
		 */
		public static final String EVENT_TYPE_UNSUBSCRIBE = "unsubscribe";

		/**
		 * 事件类型：CLICK(自定义菜单点击事件)
		 */
		public static final String EVENT_TYPE_CLICK = "CLICK";

		/**
		 * 文本类型
		 */
		public static final String MESSAGE_TEXT = "text";// 消息类型--文本消息

		/**
		 * 模版备注1
		 */
		public final static String TEMPLATE_REMARK_1 = "请点击详情，补充业务明细！";

		/**
		 * 模版备注2
		 */
		public final static String TEMPLATE_REMARK_2 = "由于明细发生改变，请核对并确定业务信息！";

		/**
		 * 模版备注3
		 */
		public final static String TEMPLATE_REMARK_3 = "业务消息反馈，点击查看截图！";

		/**
		 * 手机注册页面
		 */
		public final static String APP_REGISTERED_HTML = "/wechat/businessProject/register.html";

		/**
		 * 手机变更页面
		 */
		public final static String APP_CHANGE_HTML = "/wechat/businessProject/change.html";

		/**
		 * 手机刻章页面
		 */
		public final static String APP_STAMP_HTML = "/wechat/businessProject/stamp.html";
		
		/**
		 * 手机注销页面
		 */
		public final static String APP_CANCEL_HTML = "/wechat/businessProject/cancel.html";
		/**
		 * 手机截图页面
		 */
		public final static String APP_PICTURE_HTML = "/wechat/businessProject/picture.html";
		/**
		 * 问题反馈页面
		 */
		public final static String APP_FEEDBACK_HTML = "/wechat/questions/wxAuthorizeURI.html";
		/**
		 * 受理结果
		 */
		public final static String BUSINESS_RESULTS = "成功受理";

		/**
		 * 受理结果
		 */
		public final static String BUSINESS_CONFIRM = "确认信息";

		/**
		 * 受理结果
		 */
		public final static String BUSINESS_TRANSACTIONING = "办理中";

		/**
		 * 受理结果
		 */
		public final static String BUSINESS_COMPLETE = "办理完成";

	}

}
